<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/finance/zccb/yjy_whole_info.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/finance/zccb/yjy_whole_info.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'yjy_whole_info_id',
                footer: "Foots",
                cnName: '整车基本信息表',
                name: 'zccb/yjy_whole_info',
                url: "/yjy_whole_info/",
                sortName: "CreateDate"
            });
            const editFormFields = ref({"materialnum":"","materialnum_name":"","type":"","car_type":""});
            const editFormOptions = ref([[{"title":"整车物料号","field":"materialnum"}],
                              [{"title":"整车物料号名称","field":"materialnum_name"}],
                              [{"dataKey":"整车成本公司类型","data":[],"title":"公司类型","field":"type","type":"select"}],
                              [{"dataKey":"整车成本车辆类型","data":[],"title":"车辆类型","field":"car_type","type":"select"}]]);
            const searchFormFields = ref({"materialnum":"","materialnum_name":""});
            const searchFormOptions = ref([[{"title":"整车物料号","field":"materialnum"},{"title":"整车物料号名称","field":"materialnum_name"}]]);
            const columns = ref([{field:'yjy_whole_info_id',title:'整车基本信息id',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'materialnum',title:'整车物料号',type:'string',width:120,align:'left',sort:true},
                       {field:'materialnum_name',title:'整车物料号名称',type:'string',width:120,align:'left'},
                       {field:'type',title:'公司类型',type:'int',bind:{ key:'整车成本公司类型',data:[]},width:110,align:'left'},
                       {field:'car_type',title:'车辆类型',type:'int',bind:{ key:'整车成本车辆类型',data:[]},width:110,align:'left'},
                       {field:'describe',title:'描述',type:'string',width:220,hidden:true,align:'left'},
                       {field:'status',title:'状态',type:'int',width:110,hidden:true,align:'left'},
                       {field:'is_delele',title:'是否删除（1：未删除；2：删除）',type:'int',width:110,hidden:true,align:'left'},
                       {field:'bom_state',title:'BOM是否同步',type:'int',bind:{ key:'整车成本是否同步',data:[]},width:80,align:'left'},
                       {field:'price_state',title:'价格是否同步',type:'int',bind:{ key:'整车成本是否同步',data:[]},width:80,align:'left'},
                       {field:'Creator',title:'创建人',type:'string',width:100,align:'left'},
                       {field:'CreateDate',title:'创建日期',type:'datetime',width:150,align:'left',sort:true},
                       {field:'Modifier',title:'修改人',type:'string',width:100,hidden:true,align:'left'},
                       {field:'ModifierDate',title:'修改日期',type:'datetime',width:150,hidden:true,align:'left',sort:true}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
